[mirrors]
http://download.redis.io/releases/redis-3.0.7.tar.gz

[vars]
filesize=1375200
sha512=6c8f4c88d911e1433fd28efff2f6d62763e08be89814ebf4aa4e68e2c8bd605eba24ca3410548b2f480ae094437ce96c0bafa7a5762b3b405d5d850886297ba3

[deps]


[build]

# patch is from arch linux
patch -p1 < "$K"/redis-sane-defaults.patch
sed -i "s@ar rcs@""$CROSS_COMPILE""ar rcs@" deps/hiredis/Makefile
sed -i 's@CC:=.*$@@' deps/hiredis/Makefile
# MALLOC=libc: use musl malloc instead of jemalloc. This might be bad for performance though,
# if that is important to you, you should make benchmarks (and share them)!
make MALLOC=libc LDFLAGS="$optldflags" CFLAGS="$optcflags" V=1 -j$MAKE_THREADS \
  AR="$CROSS_COMPILE""ar"

make PREFIX="$butch_install_dir" install
install -Dm400 redis.conf "$butch_install_dir"/etc/redis.conf


# install the service
IS="$K"/bin/butch-install-service
"$IS" --down --log --force redis "$K"/services/redis
